/*
 * RentalReturnBO.java
 *
 * Created on April 1, 2007, 2:35 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package finalintex2web;

import java.util.Date;


public class RentalReturnBO {
    
    private String id;
    private Date dateIn;
    private String rentalID;
    private boolean dirty;
    private boolean inDB;
    private FeeBO f;
    
    /** Creates a new instance of RentalReturnBO */
    public RentalReturnBO(String id) {
        this.setId(id);
    }
    /** Returns a preformatted string of item details, such as size, desc., etc,
     * that are displayed on the create transaction page of the GUI
     */
    public String getDetails() {
        return ""+ this.getF().getType()  +" "+ this.getDateIn().toString()  +"";
    }
    /**
     * @param dateIn is used to calculate number of days late
     */
    public Date getDateIn() {
        return dateIn;
    }
    /**
     * @param dateIn is used to calculate number of days late
     */
    public void setDateIn(Date dateIn) {
        this.dateIn = dateIn;
    }
    
    /**
     * @param rentalID links Rental item to RentalReturnBO
     */
    public String getRentalID() {
        return rentalID;
    }
    /**
     * @param rentalID links Rental item to RentalReturnBO
     */
    public void setRentalID(String rentalID) {
        this.rentalID = rentalID;
    }
    
    /**
     * Tells you if the object has been touched
     * @param dirty returns true or false
     */
    public boolean isDirty() {
        return dirty;
    }
    /**
     * Tells you if the object has been touched
     * @param dirty can be set true or false
     */
    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }
    /**
     * Tells you if the object exists in the database
     * @param inDB returns true or false
     */
    public boolean isInDB() {
        return inDB;
    }
    /**
     * Tells you if the object exists in the database
     * @param inDB can be set true or false
     */
    public void setInDB(boolean inDB) {
        this.inDB = inDB;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    /**
     * Gets the fee associated with rental return, if it exists
     */
    public FeeBO getF() {
        return f;
    }
    /**
     * Sets the fee associated with rental return, if it is created
     */
    public void setF(FeeBO f) {
        this.f = f;
    }
    
}
